// 说出正则表达式的含义,写出下面匹配的结果
/*************** 一元字符 ****************/
var reg = /b..k/;
var str = "books";
var str2 = "boooks";
reg.test(str);
reg.test(str2);

// 
var reg = /t\wq/;
var str1 = "2222t2qkkk";
var str2 = "aaaaat$qbbbbb";
reg.test(str1);
reg.test(str2);

var reg = /\Dook/;
var str = "8ook";
reg.test(str);

var reg = /java\sscript/;
var str = "study java script";
reg.test(str);

var reg = /javascript|html|css/;
var str = "study javascript";
reg.test(str);

/*********** 匹配开始和结束 *************/
var reg = /^huruqing/;
var str = "huruqing123456";
reg.test(str);

var reg = /^huruqing$/;
var str = "huruqing123456";
reg.test(str);

/*********** 重复 *************/
var reg = /bo?k/;
var str = "book";
reg.test(str);

var reg = /bo*k/;
var str = "boook";
reg.test(str);

//+ 前面子表达式出现1次或多次
var reg = /bo+k/;
var str = "boook";
reg.test(str);

//{m,n}最少出现m次,最多出现n次
var reg = /bo{2,4}k/;
var str = "boooook";
reg.test(str);

//{m,}最少出现m次
var reg = /bo{2,}k/;
var str = "boooook";
reg.test(str);

//{m}正好出现m次
var reg = /bo{2}k/;
var str = "boook";
reg.test(str);
/****************** 反义 ****************/
var reg = /o[^usb]t/;
var str = "oat";
reg.test(str);

var reg = /[a-zA-Z0-9]ook/;
var str = "8ook";
reg.test(str);
